package com.i2works.smartluolong;


import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 主页WEB模块启动类
 *
 * @author Liu Yutao <koal@vip.qq.com>
 * @date 2017/11/27 11:35
 */

@SpringBootApplication
//扫描spring组件
@ComponentScan(basePackages = {"com.i2works.smartluolong.web", "com.i2works.smartluolong.utils"})
//扫描mapper文件
@MapperScan(basePackages = {"com.i2works.smartluolong.web.dal"})
//开启缓存
@EnableCaching
//启动事物
@EnableTransactionManagement
//开启异步
@EnableAsync
public class SmartWebApplication extends SpringBootServletInitializer  {

    private static final Logger logger = LoggerFactory.getLogger(SmartWebApplication.class);

    public static void main(String[] args) {
        SpringApplication.run(SmartWebApplication.class, args);
        logger.error("========================================================");
        logger.error("主页WEB模块 - 系统启动成功！");
        logger.error("========================================================");
    }

}
